<%@ page language="java" contentType="text/html; charset=utf-8"
		 pageEncoding="utf-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html lang="en">
<head>
	<meta name="viewport"
		  content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>添加学生</title>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/statics/css/bootstrap.min.css">
	<style>
		.form-control {
			height: 30px;
		}
	</style>
</head>
<body>
<div class="container-fluid">
	<div class="row">
		<div class="col-sm-offset-2 col-sm-8">
			<form action="${pageContext.request.contextPath}/student/updateStudent" method="post">
				<input type="hidden" value="${student.sid}" name="student.sid">
				<div class="form-group">
					<label>名称:</label>
					<input type="text" name="student.sname" value="${student.sname}" class="form-control" >
				</div>
				<div class="form-group">
					<label>生日:</label>
					<input type="date" name="student.sbirthday"  value="<fmt:formatDate value="${student.sbirthday}" pattern="yyyy-MM-dd"/>" class="form-control" >
				</div>
				<div class="form-group">
					<label>QQ:</label>
					<input type="text" name="student.sqq"  value="${student.sqq}" class="form-control" >

				</div>
				<div class="form-group">
					<label>Phone:</label>
					<input type="text" name="student.sphone"  value="${student.sphone}"  class="form-control">
				</div>
				<div class="form-group">
					<label for="clazz">选择班级-小组:</label>
					<select class="form-control" name="gcId" id="clazz">
						<c:forEach var="g" items="${cnameAndGNames}">
							<option value="${g.clazz.clazzId}-${g.gid}">${g.clazz.cname}----${g.gname}</option>
						</c:forEach>
					</select>
				</div>
				<div class="form-group">
					<label for="city">就业城市:</label>
					<select class="form-control" name="student.city.cid" id="city">
						<c:forEach var="city" items="${cities}">
							<option value="${city.cid}">${city.cname}</option>
						</c:forEach>
					</select>
				</div>
				<div class="form-group">
					<label>请选择标签:</label>
					<div class="checkbox">
						<c:forEach var="mark" items="${marks}">
							<label style="margin-right: 5px;">
								<input type="checkbox" value="${mark.mid}" name="student.marks.mid" >
									${mark.mname}
							</label>
						</c:forEach>
					</div>
				</div>
				<button type="submit" class="btn btn-info btn-block btn-sm">修改学生信息</button>
			</form>
		</div>
	</div>
</div>
</body>
</html>
